<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>菜鸟教程 React 实例</title>
    <link rel="shortcut icon" type="image/x-icon" href="/static/imgs/美女.jpg"/>
    <script src="https://cdn.staticfile.org/react/15.4.2/react.min.js"></script>
    <script src="https://cdn.staticfile.org/react/15.4.2/react-dom.min.js"></script>
    <script src="https://cdn.staticfile.org/babel-standalone/6.22.1/babel.min.js"></script>
</head>
<body>
<div id="example"></div>
<script type="text/babel">
    var title = "菜鸟教程";
    // var title = 123;
    var MyTitle = React.createClass({
        propTypes: {
            title: React.PropTypes.string.isRequired,
        },

        render: function () {
            return <h1> {this.props.title} </h1>;
        }
    });
    ReactDOM.render(
        <MyTitle title={title}/>,
        document.getElementById('example')
    );
</script>

<!--<h1 th:text="${session.username}">
</h1>-->
<h1 th:text="${msg}">
</h1>
<a href="/testSessionAttribute">testSessionAttribute</a>

</body>
</html>